﻿using System;
using System.Threading.Tasks;

using Windows.Media.MediaProperties;
using Windows.Storage;

using XConductor.Domain.Seedwork.Capturing.Settings;

namespace XConductor.Domain.WP8.Capturing.Settings
{
    public class CaptureSettingsService : ICaptureSettingsService
    {
        public async Task<ICaptureSettings> AudioToFile(string path)
        {
            var settings = new CaptureSettings 
            { 
                CaptureType = CaptureType.File,
                OutputFile = await KnownFolders.VideosLibrary.CreateFileAsync(path, CreationCollisionOption.ReplaceExisting),
                MediaEncodingProfile = MediaEncodingProfile.CreateMp3(AudioEncodingQuality.Auto)
            };

            return settings;
        }
    }
}
